package com.power.sifa.correction.api;

import com.plf.common.domain.ResponseDTO;
import com.power.sifa.correction.model.Cre_work_record;
import com.power.sifa.correction.model.pageInfo.Cre_work_recordPageInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 处置记录 Feign
 */
public interface ICre_work_recordFeign {

    /**
     * 处置记录分页列表
     */
    @PostMapping("/cre_work_record/list")
    ResponseDTO list(@RequestBody Cre_work_recordPageInfo cre_work_recordPageInfo);

    /**
     * 查看处置记录
     */
    @GetMapping("/cre_work_record/view")
    ResponseDTO view(@RequestParam("id") Integer id);

    /**
     * 删除处置记录
     */
    @PostMapping("/cre_work_record/delete")
    ResponseDTO delete(@RequestParam("id") Integer id);

    ///**
    // * 查看处置记录 复合主键使用
    // */
    //@PostMapping("/cre_work_record/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Cre_work_record.Cre_work_recordPK pk);

    /**
     * 修改或保存处置记录
     */
    @PostMapping("/cre_work_record/save")
    ResponseDTO save(@RequestBody Cre_work_record cre_work_record);

    ///**
    // * 删除处置记录 复合主键使用
    // */
    //@PostMapping("/cre_work_record/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Cre_work_record.Cre_work_recordPK pk);

    /**
     * 批量删除处置记录
     */
    @PostMapping("/cre_work_record/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

    /**
     * 导出excel
     */
    @PostMapping("/cre_work_record/output")
    void output(HttpServletResponse response, @RequestBody Cre_work_recordPageInfo cre_work_recordPageInfo);

    /**
     * 导出excel模板
     */
    @PostMapping("/cre_work_record/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);

    /**
     * 导入excel
     */
    @PostMapping("/cre_work_record/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException;

    /**
     * 关联查询处置记录列表
     *
     * @param pageInfo
     * @return
     */
    @PostMapping("/cre_work_record/queryList")
    ResponseDTO queryList(@RequestBody Cre_work_recordPageInfo pageInfo);

    /**
     * 根据预警id查询处置记录
     *
     * @param warnid
     * @return
     */
    @PostMapping("/cre_work_record/findListByWarnId")
    ResponseDTO findListByWarnId(String warnid);

}
